Extending MediaMonkey's Functionality

MediaMonkey offers scripting support, providing a powerful way to enhance its functionality. Scripts can be created by anyone who is moderately technically proficient, and installed by any user.

To add custom functionality:

  1. Create a script (e.g. Newscript.vbs) or locate an existing script and save it to MediaMonkey's /scripts or /scripts/auto folder
  2. Define the script in MediaMonkey's  "\Scripts\Scripts.ini" file (only required for scripts that aren't copied to /scripts/auto folder)
  3. Restart MediaMonkey

Creating a Script

The scripts used by MediaMonkey are compatible with the Windows Scripting Host, meaning that you can use any language supported by this host, although most users use VBScript. Simply create a script (e.g. Newscript.vbs) and save it to /Program Files/MediaMonkey/Scripts/ .

In order to work with MediaMonkeyÆs objects from your scripts, an æSDBÆ object is always available allowing you to access its properties and methods. If you wish to access MediaMonkey's scripting functions from outside of MediaMonkey, (e.g. via an ASP page), you can create this object with the following code:

Dim SDB
Set SDB = CreateObject( "MediaMonkey.SDBApplication")

Note: ôMediaMonkey init.vbsö file is always executed before your script and therefore contains some constants that may be used afterwards within your script.

More information about the properties and methods of the SDB object and related objects, along with sample code can be found in MediaMonkeyScripting.chm. A good and fairly complex example of a script is Export.vbs (distributed with MediaMonkey) which contains code responsible for MediaMonkey's export/reporting functionality.

Defining a Script

Edit the C:\Program Files\MediaMonkey\Scripts\Scripts.ini file to include information about the newly created script. This file is a standard .ini file where each section defines one custom script. Each section contains the following information:

Related Information:

See the MediaMonkey Scripts web site to download scripts

See the  MediaMonkey Development Forum for more information about scripts and components

See Windows Scripting for more information about scripting in general (e.g. VBScript and JScript)